(function ($) {

    $.fn.skartBindDropdown = function (options) {

        // Establish our default settings
        var mySettings = $.extend({
            collection: null,
            value: "",
            text: "",
            defaultText: "--Select--"
        }, options);
        
        var myThis = $(this);
        
        myThis.html("<option value=''>" + mySettings.defaultText + "</option>");
        $.each(mySettings.collection, function (key, value) {

            var ddVlue = value[mySettings.value];
            var ddText = value[mySettings.text];

            myThis.append("<option value='" + ddVlue + "'>" + ddText + "</option>");
        });
    }

}(jQuery));